﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="nc.bs.ebvppub.tools.DateTools" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>

<html xmlns="http://www.w3.org/1999/xhtml">

<%
String basePath = request.getContextPath();
%>

<head>
    <script src="js/jquery-1.4.4.js" type="text/javascript"></script> 
     <script language=JavaScript>
     	//导出报价
     	function doExportDetail(){
			document.exportPkForm.action="<%=basePath%>/contractprice/exportdetail2ExlBatch";
			document.exportPkForm.submit();
		}
		//新建合同协议报价变更
		function addnew(){
			window.location.href="<%=basePath%>/contractprice/ctreptlist/viewhistory/addnew?pk_con_md_h=" +  "${MDHEAD_FORM.pk_mdApp}";
		}
	</script>  
</head>

<body class="fullbody">
	    <div class="context">
                <div class="position">
                    <div class="tposi">
                        当前位置：<a href="<%=request.getContextPath()%>/infopub/pubmain?menuid=1" class="linkstyle">首页</a>&nbsp;&gt;&gt;&nbsp;<a href="javascript:changeMenu(3,'');"
                            class="linkstyle">我的订单\合同</a>&nbsp;&gt;&gt;&nbsp;<a href="<%=request.getContextPath()%>/contractprice/ctreptlist?menuid=35" class="linkstyle">合同协议报价维护</a>&nbsp;&gt;&gt;&nbsp;<span
                                class="curposition">查看报价</span></div>
                  <div class="help">
                  		<a href="javascript:void(null);" onclick="doHelp('<%=request.getContextPath()%>/help/html/HTXYBJWH.html');" class="linkstyle">帮助</a>
              		</div>
                </div>
                <div class="margin8">
                </div>
                <div class="subpage_title">
                    <div class="title_index">
                        <img src="<%=basePath%>/images/common/dot03.gif" alt="" border="0" />&nbsp;查看报价</div>
                    <div class="rollback">
                        <a href="<%=request.getContextPath()%>/contractprice/ctreptlist?menuid=35">&lt;&lt;&nbsp;返回合同协议报价维护</a>
                    </div>
                </div>
                <div class="margin10">
                </div>
                <div>
                    <div class="priceform">
                        <div class="contract_price_form_title">
                            <p align="center">
                                ${MDHEAD_FORM.mdAppName}(申请单号: ${MDHEAD_FORM.mdAppBillno})
                            </p>
                        </div>
                        <div class="margin10">
                        </div>
                        <div class="lineconner1">
                            <div class="left1">
                                <img src="<%=basePath%>/images/conner/a_01.png" alt="" /></div>
                            <div class="right1">
                                <img src="<%=basePath%>/images/conner/b_01.png" alt="" /></div>
                            <div class="c_context">
                                <form name="exportPkForm" id="exportPkForm" action="" method="post" >
                                	<input type="hidden" name="export_pks" value="${MDHEAD_FORM.pk_mdApp}" />
                                </form>
                                <form name="detailForm" id="detailForm" action="" method="get" >
                                </form>
                                
                                <table class="searchtable" cellpadding="0" cellspacing="0" border="0" width="700">
                                  <tbody>
                                    <tr class="inputrow">                                       
                                        <td class="w_1">
                                                                                                                      变更申请单号：
                                        </td>
                                        <td class="w_2">
                                            ${MDHEAD_FORM.mdAppBillno}
                                        </td>
                                        <td class="w_1">
                                                                                                                     变更申请名称：
                                        </td>
                                        <td class="w_2">
                                        	${MDHEAD_FORM.mdAppName}
                                        </td>
                                    </tr>
                                 
                                    <tr class="inputrow">
                                        <td class="w_1">
                                                                                                                     变更申请部门：
                                        </td>
                                        <td class="w_2">
                                            ${MDHEAD_FORM.mdAppDept}
                                        </td>
                                        <td class="w_1">
                                                                                                                     变更申请人：
                                        </td>
                                        <td class="w_2">
                                        	${MDHEAD_FORM.mdAppPerson}
                                        </td>
                                    </tr>
                                    <tr class="inputrow">
                                        <td class="w_1">
                                                                                                                    变更申请理由：
                                        </td>
                                        <td class="w_2">
                                            ${MDHEAD_FORM.mdAppReason}
                                        </td>
                                    	<td class="w_1">
                                                                                                                     合同协议报价编号：
                                        </td>
                                        <td class="w_2">
                                            ${MDHEAD_FORM.ctRepoNo}                                            
                                        </td>                                                                                                        
                                    </tr>
                                    
                                    <tr class="inputrow">
                                        <td class="w_1">
                                                                                                                    合同协议报价名称：
                                        </td>
                                        <td class="w_2">
                                       		${MDHEAD_FORM.ctRepoName}     
                                        </td>
                                         <td class="w_1">
                                                                                                                     计划生效日期：
                                        </td>
                                        <td class="w_2">
                                       		${MDHEAD_FORM.supposeValidDate}                                       		
                                        </td>                                        
                                    </tr>
                                    <tr class="inputrow">
                                    	<td class="w_1">
                                                                                                                     计划失效日期：
                                        </td>
                                        <td class="w_2">
                                       		${MDHEAD_FORM.supposeInvalidDate}                                       		
                                        </td>
                                        <td class="w_1">
                                                                                                                  采购公司：
                                        </td>
                                        <td class="w_2">
                                           ${MDHEAD_FORM.org_name}
                                        </td>
                                    </tr>
                                    <tr class="inputrow">
                                        <td class="w_1">
                                                                                                                     币种：
                                        </td>
                                        <td class="w_2">
                                           ${MDHEAD_FORM.currency}
                                        </td>
                                         <td class="w_1">
                                        	  确认状态：
                                        </td>
                                        <td class="w_2">
                                            ${MDHEAD_FORM.cfmstatus_name}                                     	 
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>  
                            </div>
                            <div class="left2">
                                <img src="<%=basePath%>/images/conner/c_01.png" alt="" /></div>
                            <div class="right2">
                                <img src="<%=basePath%>/images/conner/d_01.png" alt="" /></div>
                        </div>
                    </div>
                    <div class="margin10">
                    </div>
                    <div class="pricelist">
                        <div>
                            <b>产品信息</b>
                        </div>
                        <div class="margin10">
                        </div>
                        <div class="contract_price">                        
                            <div>                                
                               <table cellpadding="0" cellspacing="0" class="tableCss" >
									<tr class="titleTr">
										<th width="313">
											产品
										</th>
										<th width="101">
											数量
										</th>
										<th width="190">
											价格
										</th>
										<th class="th1" width="196">
											金额
										</th>
									</tr>
									<%
										String i = "1";
									%>
									<c:if test="${MD_BODY_FORM_LIST != null}">
										<c:forEach items="${MD_BODY_FORM_LIST}" var="item">
											<%
												int x = Integer.parseInt(i);
														if (x % 2 == 1) {
											%>
										    <tr align="left" class="contTr-old"  >
										    <%
										    	} else {
										    %>
											<tr align="left" class="contTr-even">
											<%
												}
											%>
										    	<td class="td1">
										    		<c:if test="${item.pk_prod!=null}">
										    			<span class="prodName">${item.pk_prod_name}</span><br/>
										    			<c:if test="${item.module!=null}">规格：${item.module}<br/></c:if>
										    			<c:if test="${item.type!=null}">型号：${item.type}<br/></c:if>
										    			<c:if test="${item.project_name!=null}"> 项目：${item.project_name}<br/></c:if>
										    			<c:if test="${item.producer_name!=null}">生产厂商：${item.producer_name}</c:if>
										    		</c:if>
										    		<c:if test="${item.pk_prod==null}">
										    			<span class="prodName">${item.prod_type_name}</span>
										    		</c:if>
										    	</td>
										    	<td class="td1">
										    		<font class="words-blue">${item.number}</font>${item.unit_name}
										    	</td>
										    	<td class="td1">
										    		含税单价：<font class="words-red-bold">${item.tax_price}</font>
										    		<br/>
										    		无税单价：<font class="words-red-bold">${item.taxless_price}</font>
													<br/>
													折扣率：	
														<font class="words-blue">${item.discount}%</font>
													<br/>
													净含税单价：<font class="words-red-bold">${item.disct_tax_price}</font>
										    	</td>
										    	
										    	<td class="td1">
										    		税率：<font class="words-blue">${item.rate}%</font>
													<br/>
													价税合计：<font class="words-red-bold">${item.total_price_tax}</font> 
										    	</td>
										   	</tr>
											<%
												x++;
												i = String.valueOf(x);
											%>
										</c:forEach>
									</c:if>
								</table>
                            </div>
                        </div>
                        <div class="margin8">
                        </div>
                    </div>
                    <div class="margin10">
                    </div>
                    <div>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                      	 <tr>
                            <td align="left">
                            	<label onclick="doExportDetail()" class="ebvpLinkStyle">&gt;&gt;导出报价</label>
                            </td>
                        </tr>
                 	</table>
                    </div>
                </div>
                
                <div class="margin10">
                </div>
            </div>
	</body>
</html>
